package m.html.element;

import m.html.element.attr.Size;
import m.html.element.other.InputElement;
import m.html.element.other.ItemsDataElement;
import m.html.element.other.ItemsQuery;

public class Select extends InputElement implements ItemsDataElement {

	public Select(String field) {
		super("a-select");
		super.setField(field);
		super.setSize(Size.DEFAULT);
		super.setDisabled("false");
		super.setPlaceholder("");
		super.A("showSearch","true");
		
	}
	private ItemsQuery itemsQuery;
	public ItemsQuery getItemsQuery() {
		return itemsQuery;
	}
	public Select setItemsQuery(ItemsQuery itemsQuery) {
		this.itemsQuery=itemsQuery;
		return this;
	}
	
//	public Element toElement() {
//		Element ele=Element.tag("a-select");
//		ele.addAttr("showSearch","true");
//		ele.addAttr("v-model:value", this.field);
//		ele.addAttr("size", this.size.toString());
//		ele.addAttr(":disabled", this.disabled);
//		ele.addAttr("placeholder", this.placeholder);
//		if(null!=this.itemsQuery) {
//			
//		}else {
//			for(ItemsData item : this.items) {
//				ele.E(Element.tag("a-select-option").A("key",item.getValue()).A("value",item.getValue())
//						.E(new Text(item.getTitle())));
//			}
//		}
//		return ele;
//	}
//	public String toString() {
//		return toElement().toString();
//	}

	
}
